Java Method Calls in the Hierarchy - Uncovering Yet another Inheritance Foible
نویسندگان
چکیده
This paper describes an empirical investigation into method calls between classes at each level of the inheritance hierarchy in four, Java open source systems. We distinguish between method calls made to super classes in the hierarchy and external method calls made outside the line of super classes to the root. The premise on which the research rests is that classes should predominantly make use of super class functionality (as theory suggests) and relatively infrequent use of functionality outside those super classes. Results revealed that the most method calls were made to the methods of the classes where the majority of functionality resided (at shallow hierarchical levels) and not necessarily to the super classes of a class. The evidence presented therefore implies that developers are not using inheritance in the spirit originally intended and lends weight to the growing belief that OO inheritance has more practical foibles than theoretically stated advantages.
منابع مشابه
Interference Analysis for AspectJ pdfauthor
AspectJ is a language implementing aspect-oriented programming on top of Java. Besides modification of program flow and state using advice, AspectJ offers language elements to statically modify existing classes by changing their position in the inheritance hierarchy or introducing new members. This can lead to binding interference, i.e. the dynamic lookup of method calls not affected directly b...
متن کاملSupervenience as a Design Pattern
Single-inheritance object-oriented languages have been extended with features for adding methods to a class from other classes without disturbing the source code of the receiving unit. Well known examples include traits, mix-ins, default methods in interfaces, and method references. The purpose of these offerings is explained in terms of convenient re-use of individual instance methods. These a...
متن کاملComputing Interfaces in Java
We investigate the separation between types and classes by putting to use a special feature of Java regarding classes, interfaces and inheritance. We propose an original method which, from a single inheritance class hierarchy, extracts a multiple inheritance interface hierarchy, which contains all the types of the original hierarchy, each class being linked to the interface representing its typ...
متن کاملChoosing Efficient Inheritance Patterns for Java Generics
Java generic types allow a programmer to create parameterized data structures and methods. For instance, a generic Stack type may be used for integers in one instance and for strings in another. Java compiler guarantees in this case that integers and strings are not mixed in the same stack. We study runtime efficiency of a certain inheritance pattern related to Java generic types: narrowing of ...
متن کاملModeling Behavior with Personalities
Decoupling behavior modeling from a specific inheritance hierarchy has become one of the challenges for objectoriented software engineering. The goal is to encapsulate behavior on its own, and yet be able to freely apply it to a given class structure. We claim that standard objectoriented languages do not directly address this problem and propose the concept of Personalities as a design and pro...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- CIT
دوره 18 شماره
صفحات -
تاریخ انتشار 2010